package com.swt.service.T_service.impl;

import com.swt.dao.Tdao.MemberDao;
import com.swt.domain.Member;
import com.swt.service.T_service.MemberService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service("TMemberService")
@Transactional
public class MemberServiceImpl implements MemberService {
    @Resource(name ="TMemberDao" )
    private MemberDao memberDao;
    @Override
    public boolean memberAdd(Member member, int clubClubId) {
      boolean add = memberDao.memberAdd(member,clubClubId);
        return add;
    }

    @Override
    public List<Member> memberQuery(int clubClubId) {
        return memberDao.memberQuery(clubClubId);
    }

    @Override
    public boolean memberDelete(int id) {
        return memberDao.memberDelete(id);
    }

    @Override
    public List<Member> memberQuery2(int id) {
        return memberDao.memberQuery2(id);
    }

    @Override
    public boolean memberUpdate(Member member) {
        return memberDao.memberUpdate(member);
    }

    public MemberDao getMemberDao() {

        return memberDao;
    }

    public void setMemberDao(MemberDao memberDao) {
        this.memberDao = memberDao;
    }
}
